package com.primb.bench.project.init.model;


import com.primb.bench.common.module.http.service.ApiClient;
import com.primb.bench.common.module.http.service.ApiService;
import com.primb.bench.project.init.contract.LoginContract;
import com.primb.bench.project.init.entity.LoginEntity;
import com.primb.netlibs.converter.RxSchedulerUtils;

import rx.Observable;

/**
 * Created by Administrator on 2017/04/13
 */

public class LoginModelImpl implements LoginContract.Model {

    @Override
    public Observable<LoginEntity> login(final String username, final String password) {
        return ApiClient.initService(ApiService.class).getLoginInfo(username, password).compose(RxSchedulerUtils.normalSchedulersTransformer());

    }
}